/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase - For1
 * <p>Powered by webrx On 2021-11-25 10:07:09
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class For1 {
    public static void main(String[] args) {
        //01 for 死循环语句
        //for (; ; ) {
        //    System.out.println("ok");
        //}

        for (int i = 1; i <= 3; i++) {
            System.out.println(i);
        }

        //continue 停止这次循环，立即开始上次循环
        //break 终止循环语句，跳出循环语句
        for (int i = 10; i > 1; i--) {
            if (i % 2 == 0) continue;
            System.out.println(i);
            if (i == 5) break;
            i = 1;
        }


    }
}
